// pages/home/subscribe/com/call-service/call-service.js
import api from "../../../common/api"
Component({
  /**
   * 组件的配置
   */
  options: {
    styleIsolation: 'isolated',
    pureDataPattern: /^_/
  },

  /**
   * 组件的传入样式
   */
  externalClasses: ['extra-style'],

  /**
   * 组件的属性列表
   */
  properties: {
    custom: {
      type: Boolean,
      value: false,
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    onTMK() {
      return new Promise((resolve, reject) => {
        api.getPrivateSale({}, res => {
          wx.makePhoneCall({
            phoneNumber: res.data.content.serviceMobile,
            success() {},
            fail() {}
          })
        })
      })
    },
  }
})